//
//  Extension+UILable.swift
//  XLVeibo
//
//  Created by macbook on 16/6/27.
//  Copyright © 2016年 buWangChuXing. All rights reserved.
//

import UIKit


extension UILabel{

    convenience init (textColor:UIColor,textFont:CGFloat,labelWith:CGFloat = 0){
    
        self.init()
        
        //设置字体颜色
        self.textColor = textColor
        
        self.font = UIFont.systemFontOfSize(textFont)
        
        if labelWith > 0 {
            
            
            self.preferredMaxLayoutWidth = labelWith
            self.numberOfLines = 0;
        }
    
    }

}
